Use thermal expansion or contraction or differences of materials.
This Austrailian bug has infrared sensors to detect bush fires. A very thin foil in its ear react on heat strain.
BI-metallic strips are used for thermostats and switches.